package com.liugege.make.builder.buildcar;

import java.util.ArrayList;
import java.util.List;

public class Director {
    private List<String> sequence = new ArrayList<>();
    private BaoMaCarBuilder baoMaCarBuilder = new BaoMaCarBuilder();
    private BenChiCarBuilder benChiCarBuilder = new BenChiCarBuilder();

    public BeanCar getBaoMaCarAA(){
        this.sequence.clear();
        this.sequence.add("engineBoom");
        this.sequence.add("start");
        this.sequence.add("stop");
        this.baoMaCarBuilder.setSequence(this.sequence);
        BeanCar beanCar = this.baoMaCarBuilder.getBeanCar();
        return beanCar;
    }
    public BeanCar getBaoMaCarBB(){
        this.sequence.clear();
        this.sequence.add("engineBoom");
        this.sequence.add("start");
        this.sequence.add("alarm");
        this.sequence.add("stop");
        this.baoMaCarBuilder.setSequence(this.sequence);
        BeanCar beanCar = this.baoMaCarBuilder.getBeanCar();
        return beanCar;
    }
    public BeanCar getBenChiCarAA(){
        this.sequence.clear();
        this.sequence.add("engineBoom");
        this.sequence.add("start");
        this.sequence.add("alarm");
        this.sequence.add("stop");
        this.benChiCarBuilder.setSequence(this.sequence);
        BeanCar beanCar = this.benChiCarBuilder.getBeanCar();
        return beanCar;
    }
    public BeanCar getBenChiCarBB(){
        this.sequence.clear();
        //this.sequence.add("engineBoom");
        this.sequence.add("start");
        //this.sequence.add("alarm");
        this.sequence.add("stop");
        this.benChiCarBuilder.setSequence(this.sequence);
        BeanCar beanCar = this.benChiCarBuilder.getBeanCar();
        return beanCar;
    }
}
